home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_gimp.idb / usr / freeware / share / gimp / scripts / t-o-p-logo.scm.z / t-o-p-logo.scm
Encoding:
GIMP Script-Fu Script  |  1999-07-21  |  4.0 KB  |  98 lines

  1. ;;  Trace of Particles Effect
  2. ;; Shuji Narazaki (narazaki@InetQ.or.jp)
  3. ;; Time-stamp: <97/03/15 17:27:33 narazaki@InetQ.or.jp>
  4. ;; Version 0.2
  5.  
  6. (define (script-fu-t-o-p-logo text size font hit-rate edge-size edge-only base-color bg-color)
  7.   (let* ((img (car (gimp-image-new 256 256 RGB)))
  8.      (border (/ size 5))
  9.      (text-layer (car (gimp-text img -1 0 0 text (* border 2) TRUE size PIXELS "*" font "*" "*" "*" "*")))
  10.      (width (car (gimp-drawable-width text-layer)))
  11.      (height (car (gimp-drawable-height text-layer)))
  12.      (text-layer-mask (car (gimp-layer-create-mask text-layer BLACK-MASK)))
  13.      (sparkle-layer (car (gimp-layer-new img width height RGBA_IMAGE "Sparkle" 100 NORMAL)))
  14.      (shadow-layer (car (gimp-layer-new img width height RGBA_IMAGE "Shadow" 90 ADDITION)))
  15.      (bg-layer (car (gimp-layer-new img width height RGB_IMAGE "Background" 100 NORMAL)))
  16.      (selection 0)
  17.      (white '(255 255 255))
  18.      (old-fg (car (gimp-palette-get-foreground)))
  19.      (old-bg (car (gimp-palette-get-background)))
  20.      (old-brush (car (gimp-brushes-get-brush)))
  21.      (old-paint-mode (car (gimp-brushes-get-paint-mode))))
  22.     (gimp-image-disable-undo img)
  23.     (gimp-image-resize img width height 0 0)
  24.     (gimp-image-add-layer img sparkle-layer 2)
  25.     (gimp-image-add-layer img shadow-layer 3)
  26.     (gimp-image-add-layer img bg-layer 4)
  27.     (gimp-selection-none img)
  28.     (gimp-edit-clear img shadow-layer)
  29.     (gimp-edit-clear img sparkle-layer)
  30.     (gimp-palette-set-background base-color)
  31.     (gimp-edit-fill img sparkle-layer)
  32.     (gimp-palette-set-background base-color)
  33.     (gimp-selection-layer-alpha img text-layer)
  34.     (set! selection (car (gimp-selection-save img)))
  35.     (gimp-selection-grow img edge-size)
  36.     '(plug-in-noisify 1 img sparkle-layer FALSE
  37.              (* 0.1 hit-rate) (* 0.1 hit-rate) (* 0.1 hit-rate) 0.0)
  38.     (gimp-selection-border img edge-size)
  39.     (plug-in-noisify 1 img sparkle-layer FALSE hit-rate hit-rate hit-rate 0.0)
  40.     (gimp-selection-none img)
  41.     (plug-in-sparkle 1 img sparkle-layer 0.03 0.45 width 6 15)
  42.     (gimp-selection-load img selection)
  43.     (gimp-selection-shrink img edge-size)
  44.     (gimp-levels img sparkle-layer 0 0 255 1.2 0 255)
  45.     (gimp-selection-load img selection)
  46.     (gimp-selection-border img edge-size)
  47.     (gimp-levels img sparkle-layer 0 0 255 0.5 0 255)
  48.     (gimp-selection-load img selection)
  49.     (gimp-selection-grow img (/ edge-size 2.0))
  50.     (gimp-selection-invert img)
  51.     (gimp-edit-clear img sparkle-layer)
  52.     (if (= 1 edge-only)
  53.     (begin
  54.       (gimp-selection-load img selection)
  55.       (gimp-selection-shrink img (/ edge-size 2.0))
  56.       (gimp-edit-clear img sparkle-layer)
  57.       (gimp-selection-load img selection)
  58.       (gimp-selection-grow img (/ edge-size 2.0))
  59.       (gimp-selection-invert img)))
  60.     (gimp-palette-set-foreground '(0 0 0))
  61.     (gimp-palette-set-background '(255 255 255))
  62.     (gimp-brushes-set-brush "Circle Fuzzy (11)")
  63.     (gimp-selection-feather img border)
  64.     (gimp-edit-fill img shadow-layer)
  65.     (gimp-selection-none img)
  66.     (gimp-palette-set-background base-color)
  67.     (gimp-edit-fill img bg-layer)
  68.     (gimp-selection-load img selection)
  69.     (gimp-brushes-set-brush "Circle Fuzzy (07)")
  70.     (gimp-palette-set-foreground '(255 255 255))
  71.     (gimp-selection-none img)
  72.     (gimp-palette-set-foreground old-fg)
  73.     (gimp-palette-set-background old-bg)
  74.     (gimp-brushes-set-brush old-brush)
  75.     (gimp-brushes-set-paint-mode old-paint-mode)
  76.     (gimp-layer-set-visible text-layer 0)
  77.     (gimp-image-set-active-layer img sparkle-layer)
  78.     (gimp-image-enable-undo img)
  79.     (gimp-display-new img)))
  80.  
  81. (script-fu-register "script-fu-t-o-p-logo"
  82.             "<Toolbox>/Xtns/Script-Fu/Logos/Particle Trace"
  83.             "Trace of Particles Effect"
  84.             "Shuji Narazaki (narazaki@InetQ.or.jp)"
  85.             "Shuji Narazaki"
  86.             "1997"
  87.             ""
  88.             SF-VALUE "Text String" "\"The GIMP\""
  89.             SF-VALUE "Font Size (in pixels)" "100"
  90.             SF-VALUE "Font" "\"Becker\""
  91.             SF-VALUE "Hit Rate [0.0,1.0]" "0.2"
  92.             SF-VALUE "Edge Width" "2"
  93.             SF-VALUE "Edge Only [0/1]" "0"
  94.             SF-COLOR "Base Color" '(0 40 0)
  95.             SF-COLOR "Background Color" '(255 255 255))
  96.  
  97. ; end of t-o-p.scm
  98.